package com.atguigu.factory.cFactoryMethod.pizzaStore.order;

import com.atguigu.factory.cFactoryMethod.pizzaStore.pizza.LdCheesePizza;
import com.atguigu.factory.cFactoryMethod.pizzaStore.pizza.LdPepperPizza;
import com.atguigu.factory.cFactoryMethod.pizzaStore.pizza.Pizza;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: （伦敦）订购披萨
 * @create: 2022-01-21 21:17
 **/
public class LdOrderPizza extends OrderPizza{
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheese".equals(orderType)){
            pizza = new LdCheesePizza();
        }else if ("pepper".equals(orderType)){
            pizza = new LdPepperPizza();
        }
        return pizza;
    }
}
